fix(ipa): fix import issue with parquet-wasm package #976
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed changes
parquet-wasm 0.7.0 has package.json with "type": "module" which makes Node.js treat .js files as ES modules. However, the node build uses CommonJS syntax.
Solution: Since this file has a .cjs extension, Node.js always treats it as CommonJS, allowing us to use require(). We then use createRequire() in our ES module to load this wrapper.
See: kylebarron/parquet-wasm#798
Alternative option:
Pin the previous version of the package until the issue is closed
Jira ticket: CLOUDP-349076
Closes #975
Checklist
Changes to Spectral
Further comments